home *** CD-ROM | disk | FTP | other *** search
- *** 1.14 1992/01/29 16:45:54
- --- Changelo 1992/03/08 22:00:48
- ***************
- *** 173,175 ****
- --- 173,181 ----
- always use 32 bits in expressions
-
- ------------------------------- Patchlevel 16 -----------------------------
- +
- + main.c:: ++jrb
- + make gdb -L (logging) really work. We now buffer up the output,
- + open the log file when buffer fills up, dump buffer, close file
- + and so on.
- + ------------------------------- Patchlevel 17 -----------------------------
- *** 1.8 1991/10/05 20:59:54
- --- Makefile 1992/03/08 21:07:39
- ***************
- *** 7,13 ****
-
- CC = $(CROSSBIN)/cgcc
- # -I. for "#include <obstack.h>"
- ! CFLAGS = -I. -O -fomit-frame-pointer -fcombine-regs $(XFLAGS)
- #LDFLAGS = -s
- LDFLAGS = -v -s
-
- --- 7,13 ----
-
- CC = $(CROSSBIN)/cgcc
- # -I. for "#include <obstack.h>"
- ! CFLAGS = -I. -O -fomit-frame-pointer $(XFLAGS)
- #LDFLAGS = -s
- LDFLAGS = -v -s
-
- ***************
- *** 111,115 ****
-
- TAGS: $(CFILES) $(HFILES)
- -chmod +w TAGS
- ! /util/gnu/bin/etags -t -f $@ $^
-
- --- 111,115 ----
-
- TAGS: $(CFILES) $(HFILES)
- -chmod +w TAGS
- ! /util/gnu.old/bin/etags -t -f $@ $^
-
- *** 1.9 1992/01/29 16:45:54
- --- PatchLev.h 1992/03/08 21:59:02
- ***************
- *** 1,4 ****
- ! #define PatchLevel "16"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,4 ----
- ! #define PatchLevel "17"
-
- /*
- * the Patch Level above is to identify the version
- *** 1.10 1992/01/29 16:45:54
- --- README 1992/03/08 22:01:52
- ***************
- *** 1,3 ****
- --- 1,6 ----
- + GDB @ Patchlevel 17
- + - gdb -L (logging) now always works independent of TOS etc.
- +
- GDB @ Patchlevel 16
- - andreas sent a more reliable way to intut -mshort.
-
- *** 1.5 1991/11/30 17:37:25
- --- gdb.texinfo 1992/03/08 22:07:03
- ***************
- *** 40,46 ****
- @sp 1
- @center The GNU Source-Level Debugger
- @sp 4
- ! @center Corresponding to atariST GDB PatchLevel 14.
- @sp 1
- @center September 1991
- @sp 5
- --- 40,46 ----
- @sp 1
- @center The GNU Source-Level Debugger
- @sp 4
- ! @center Corresponding to atariST GDB PatchLevel 17.
- @sp 1
- @center September 1991
- @sp 5
- ***************
- *** 549,554 ****
- --- 549,560 ----
- is only useful if you issue it before you read the symbol--file. The preferred
- way to specify this fact is to specify the @samp{-mshort} command line
- option to gdb,ttp when you invoke it.
- +
- + @item -L
- + @kindex logging
- + The @samp{-L} options turns on logging into the file @samp{gdb.log}. The file
- + is always appended to. All of gdb's input and output is logged to the file. The
- + debugees i/o is not logged here.
- @end table
-
- While all file-specifying commands allow both absolute and relative
- *** 1.6 1991/11/30 17:37:25
- --- main.c 1992/03/08 21:52:13
- ***************
- *** 88,94 ****
- #ifdef atarist
- static void Save_all_vectors();
- static void Restore_all_vectors();
- ! static volatile FILE *atari_logfile;
- extern int gcc_mshort;
- #endif
- void really_exit();
- --- 88,94 ----
- #ifdef atarist
- static void Save_all_vectors();
- static void Restore_all_vectors();
- ! static int atari_logfile;
- extern int gcc_mshort;
- #endif
- void really_exit();
- ***************
- *** 220,234 ****
- gcc_mshort = 1;
- else if (!strcmp(argv[i], "-L"))
- {
- !
- ! if(!atari_logfile)
- ! {
- ! if(!(atari_logfile = fopen("gdb.log", "at")))
- ! {
- ! fprintf_filtered(stderr,"Failed to open logfile gdb.log\n");
- ! exit(1);
- ! }
- ! }
- }
- #endif
- else if (argv[i][0] == '-')
- --- 220,226 ----
- gcc_mshort = 1;
- else if (!strcmp(argv[i], "-L"))
- {
- ! atari_logfile = 1;
- }
- #endif
- else if (argv[i][0] == '-')
- ***************
- *** 538,544 ****
- {
- if(atari_logfile)
- {
- ! fprintf(atari_logfile, "%s\n", line);
- }
- return line;
- }
- --- 530,536 ----
- {
- if(atari_logfile)
- {
- ! append_atari_logfile(line);
- }
- return line;
- }
- ***************
- *** 553,559 ****
-
- if(atari_logfile)
- {
- ! fprintf(atari_logfile, "%s\n", line);
- }
-
- return line;
- --- 545,552 ----
-
- if(atari_logfile)
- {
- ! append_atari_logfile(line);
- ! append_atari_logfile_char('\n');
- }
-
- return line;
- ***************
- *** 1364,1370 ****
- #ifdef atarist
- Restore_all_vectors();
- if(atari_logfile)
- ! fclose(atari_logfile);
- #endif
- exit(n);
- }
- --- 1357,1363 ----
- #ifdef atarist
- Restore_all_vectors();
- if(atari_logfile)
- ! flush_atari_logfile();
- #endif
- exit(n);
- }
- ***************
- *** 1378,1384 ****
- va_start(argp, fmt);
- if(atari_logfile)
- {
- ! _doprnt(atari_logfile, fmt, argp);
- }
- return(_doprnt(fp, fmt, argp));
- }
- --- 1371,1379 ----
- va_start(argp, fmt);
- if(atari_logfile)
- {
- ! char foo[1024];
- ! vsprintf(foo, fmt, argp);
- ! append_atari_logfile(foo);
- }
- return(_doprnt(fp, fmt, argp));
- }
- ***************
- *** 1389,1395 ****
- va_start(argp, fmt);
- if(atari_logfile)
- {
- ! _doprnt(atari_logfile, fmt, argp);
- }
- return(_doprnt(stdout, fmt, argp));
- }
- --- 1384,1392 ----
- va_start(argp, fmt);
- if(atari_logfile)
- {
- ! char foo[1024];
- ! vsprintf(foo, fmt, argp);
- ! append_atari_logfile(foo);
- }
- return(_doprnt(stdout, fmt, argp));
- }
- ***************
- *** 1398,1404 ****
- {
- if(atari_logfile)
- {
- ! fputc(c, atari_logfile);
- }
- return fputc(c, fp);
- }
- --- 1395,1401 ----
- {
- if(atari_logfile)
- {
- ! append_atari_logfile_char(c);
- }
- return fputc(c, fp);
- }
- ***************
- *** 1412,1419 ****
- {
- if(atari_logfile)
- {
- ! fputs(s, atari_logfile);
- }
- return fputs(s, fp);
- }
- #endif
- --- 1409,1466 ----
- {
- if(atari_logfile)
- {
- ! append_atari_logfile(s);
- }
- return fputs(s, fp);
- }
- +
- + #include <stddef.h>
- +
- + #define BUFMAX 4096
- + static char abuf[BUFMAX];
- + static size_t ai = 0;
- +
- + append_atari_logfile(char *s)
- + {
- + while(*s) append_atari_logfile_char(*s++);
- + }
- +
- + append_atari_logfile_char(int c)
- + {
- + if(c == '\n')
- + append_atari_logfile_char('\r');
- +
- + if(ai < BUFMAX)
- + abuf[ai++] = c;
- + else
- + {
- + flush_atari_logfile();
- + abuf[ai++] =c;
- + }
- + }
- +
- + flush_atari_logfile()
- + {
- + int f = open("gdb.log", O_WRONLY | O_CREAT | O_APPEND, 0666);
- +
- + if((f >= __SMALLEST_VALID_HANDLE) & ai)
- + {
- + if(write(f, abuf, ai) != ai)
- + {
- + close(f);
- + f = -100;
- + }
- + }
- + if(f < __SMALLEST_VALID_HANDLE)
- + {
- + fprintf(stderr, "Error Writing LOGFILE, further logging disabled\n");
- + atari_logfile = 0;
- + }
- + else
- + {
- + ai = 0;
- + close(f);
- + }
- + }
- +
- #endif
- *** 1.1 1991/05/23 03:29:22
- --- signal.h 1992/03/08 21:11:46
- ***************
- *** 4,20 ****
- *
- * Beware the SIGINT/SIGQUIT - right now they only work when you are read()ing
- *
- - * $Header: /home/bammi/atari/gnu/gdb/src/RCS/signal.h,v 1.1 1991/05/23 03:29:22 bammi Exp $
- *
- * much hacked by jrd
- ! *
- ! * $Log: signal.h,v $
- ! * Revision 1.1 1991/05/23 03:29:22 bammi
- ! * now with gcc lib
- ! *
- ! * Revision 1.1 88/02/03 20:06:23 m68k
- ! * Initial revision
- ! *
- */
- #define NSIG 13
-
- --- 4,12 ----
- *
- * Beware the SIGINT/SIGQUIT - right now they only work when you are read()ing
- *
- *
- * much hacked by jrd
- ! * further hacked by jrb
- */
- #define NSIG 13
-
-